<div class="modal-header">
  <button type="button" class="close" ng-click="cancel()">
    <span aria-hidden="true">&times;</span>
  </button>
  <h4 class="modal-title">
    {{'about'|translate}}
    <!-- 关于 -->
  </h4>
</div>
<div class="modal-body">
  <h4 class="text-center">
    <img ng-src="{{app_logo}}" style="display: inline-block;" width="40" />
    &nbsp;&nbsp;{{'app.name'|translate}}
    <small class="text-orange">v {{info.currentVersion}}</small>

    <div ng-if="custom_about_html" ng-bind-html="custom_about_html"></div>

    <div class="pd4" ng-if="!custom_about_html">
      <small class="text-muted">
        {{'opensource.address'|translate}}:
        <!-- 开源地址： -->
        <a href="" ng-click="open('https://github.com/aliyun/oss-browser')"
          >https://github.com/aliyun/oss-browser</a
        >
      </small>
    </div>
  </h4>

  <hr />

  <div ng-if="isLoading" class="pd2">{{'loading'|translate}}</div>

  <div ng-if="!isLoading" class="pd2">
    <div ng-if="!info.isLastVersion">
      <span class="text-info">
        {{'foundNewVersion'|translate}}
        <!-- 发现新版本： -->
        v {{info.lastVersion}} &nbsp;&nbsp;&nbsp;&nbsp;
        <a
          href=""
          ng-if="!info.files && !info.upgradeJob"
          ng-click="open(info.link)"
          class="btn btn-sm btn-success"
        >
          <i class="fa fa-download"></i>
          {{'clickToDownload'|translate}}</a
        >

        <a
          ng-if="info.files && (!info.upgradeJob||info.upgradeJob.status=='waiting')"
          href=""
          ng-click="startUpgrade()"
          class="btn btn-sm btn-success"
        >
          <i class="fa fa-download"></i>
          {{'upgrade.start'|translate}}
        </a>
      </span>
      <!-- {{info.upgradeJob}} -->

      <!-- progress -->
      <div ng-if="info.upgradeJob.status=='running'" style="margin: 4px auto;">
        <!-- 正在下载... -->
        {{'upgrade.downloading'|translate}}
        <div class="progress" style="height: 10px;">
          <div
            class="progress-bar progress-bar-info progress-bar-striped"
            role="progressbar"
            aria-valuenow="{{info.upgradeJob.progress}}"
            aria-valuemin="0"
            aria-valuemax="100"
            style="width: {{info.upgradeJob.progress}}%"
          >
            <!-- <span>{{info.upgradeJob.progress}}%</span> -->
          </div>
        </div>
      </div>

      <div ng-if="info.upgradeJob.status=='failed'">
        {{'upgrade.download.failed'|translate}}
        <a href="" ng-click="open(info.link)" class="btn btn-sm btn-primary">
          <i class="fa fa-download"></i>
          {{'clickToDownload'|translate}}
          <!-- 点此下载 -->
        </a>
      </div>

      <div ng-if="info.upgradeJob.status=='finished'" class="text-center">
        <button
          type="button"
          ng-disabled="disUpdateBtn"
          ng-click="installAndRestart();disUpdateBtn=true"
          class="btn btn-success btn-sm"
        >
          {{'upgrade.download.success'|translate}}
        </button>
      </div>

      <h5 class="clearfix">
        <!-- 主要更新： -->
        {{'main.upgration'|translate}}:
      </h5>
      <section
        class="pd4 bg-success"
        ng-bind-html="info.lastReleaseNote"
      ></section>
    </div>

    <div ng-if="info.isLastVersion">
      <span class="text-muted">
        {{'currentIsLastest'|translate}}
        <!-- 当前是最新版本! -->
      </span>
    </div>
  </div>
</div>
